import java.net.*;
import java.util.*;

import jpcap.packet.EthernetPacket;
import jpcap.packet.Packet;
import jpcap.JpcapCaptor;
import jpcap.NetworkInterface;
public class Capture_NetworkInfo {

	public java.net.NetworkInterface NETINT;
	private Enumeration<java.net.NetworkInterface> ALL_Interface;
	Enumeration<InetAddress> ALL_Addresses;
	public int InterfaceCount =0;
	public int InterfaceNumber =0;
	private byte[] data;
	
	public Capture_NetworkInfo()
	{
		GetInterfaces();
	}

	private void GetInterfaces() {
		try
		{
			setALL_Interface(java.net.NetworkInterface.getNetworkInterfaces());
			InterfaceCount = Collections.list(ALL_Interface).size();
		}catch(SocketException e){ System.out.println(e); }
	}
	
	public void DisplayInterfaceInfo(int num)
	{
		try
		{
			setALL_Interface(java.net.NetworkInterface.getNetworkInterfaces());
			NETINT = Collections.list(ALL_Interface).get(num);
		}catch(SocketException e){ System.out.println(e); }
	}

	public Enumeration<java.net.NetworkInterface> getALL_Interface() {
		return ALL_Interface;
	}

	public void setALL_Interface(Enumeration<java.net.NetworkInterface> enumeration) {
		ALL_Interface = enumeration;
	}
	
	
}
